package com.engine.action;

import com.engine.core.util.Response;
import com.engine.service.DbDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/db/resource")
public class ResourceAction {

    @Autowired
    private DbDataService  dbDataService;

    @RequestMapping("/refresh")
    public String refresh() {
        Response response = dbDataService.refreshResource();
        return response.getJSONString();
    }
}
